package cond

import "clientDemo/service/cond"

const (
	Comparer_Type_Equal        cond.Comparer_Type = 1
	Comparer_Type_Greater      cond.Comparer_Type = 2
	Comparer_Type_GreaterEqual cond.Comparer_Type = 3
	Comparer_Type_less         cond.Comparer_Type = 4
	Comparer_Type_lessEqual    cond.Comparer_Type = 5
)

func (m *CondModule) initComparer() {
	m.RegeditComparer(Comparer_Type_Equal, func(param1, param2 int64) bool {
		return param1 == param2
	})
	m.RegeditComparer(Comparer_Type_Greater, func(param1, param2 int64) bool {
		return param1 > param2
	})
	m.RegeditComparer(Comparer_Type_GreaterEqual, func(param1, param2 int64) bool {
		return param1 >= param2
	})
	m.RegeditComparer(Comparer_Type_less, func(param1, param2 int64) bool {
		return param1 < param2
	})
	m.RegeditComparer(Comparer_Type_lessEqual, func(param1, param2 int64) bool {
		return param1 <= param2
	})
}
